#include"Candy.h"
#define CANDY_SPEED 5
Candy::Candy()
{
    m_tang.load(":/res/Drops.png");
    m_x=450-m_tang.width()*0.5;
    m_y=0;
    m_free=true;
    m_speed=CANDY_SPEED;
    m_Rect.setWidth(m_tang.width());
    m_Rect.setHeight(m_tang.height());
    m_Rect.moveTo(m_x,m_y);
    void updatePosition();
    {
        if(m_free)
        {
            return;
        }
        m_y+=m_speed;
        m_Rect.moveTo(m_x,m_y);
        if(m_y<=m_Rect.height())
            m_free=true;
    }
}
